package model;

import java.io.Serializable;

/**
 * Holds the game's specific State.<br>
 * implements {@link Comparable} & {@link Serializable}<br>
 * Default Ctor gets:
 * @param stateId as incremental id
 * @param score for current game score
 * @param boardState as a reflection of the board grid values
 * @param pState for previews State
 * 
 * @author Barak & Tom
 */
public class State implements Comparable<State>, Serializable
{
	private static final long serialVersionUID = 1L;
	public int score;
	public int[][] boardState;
	public State pState;
	public int stateId;
	
	public State(int stateId, int score, int[][] boardState, State pState)
	{
		this.score = score;
		this.boardState = boardState;
		this.pState = pState;
		this.stateId = stateId;
	}
	
	@Override
	public int compareTo(State o)
	{
		return 0;
	}
	
	public boolean isEquals(State o)
	{
		if(o != null){
		return o.stateId == this.stateId;
		}
		return true;
	}
}
